package com.example.takeaway.mapper;

import java.util.List;

import com.example.takeaway.entity.Merchant;
import org.apache.ibatis.annotations.Mapper;

/**
 * merchantMapper接口
 * 
 * @author ruoyi
 * @date 2025-05-15
 */
@Mapper
public interface MerchantMapper 
{
    /**
     * 查询merchant
     * 
     * @param merchantid merchant主键
     * @return merchant
     */
    public Merchant selectMerchantByMerchantid(Long merchantid);

    public List<Merchant> getMerGoodsList(Merchant merchant);

    public List<Merchant> selectMerchantList(Merchant merchantid);

    public List<Merchant> search(String search);

    /**
     * 新增merchant
     * 
     * @param merchant merchant
     * @return 结果
     */
    public int insertMerchant(Merchant merchant);

    /**
     * 修改merchant
     * 
     * @param merchant merchant
     * @return 结果
     */
    public int updateMerchant(Merchant merchant);

    /**
     * 删除merchant
     * 
     * @param merchantid merchant主键
     * @return 结果
     */
    public int deleteMerchantByMerchantid(Long merchantid);

    /**
     * 批量删除merchant
     * 
     * @param merchantids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMerchantByMerchantids(Long[] merchantids);
}
